
#pragma once

#include "define.h"
#include <queue>

template <class T>
class CQueue
{
private:

	typedef std::queue<T>		QUEUE;

public:
	CQueue() {}
	virtual ~CQueue() 
	{
		while( !isEmpty() )			
			pop();
	}

	bool isEmpty() const { return m_container.empty(); }
	size_t size() const { return m_container.size(); }

	int push( T& data ) 
	{
		m_container.push(data);
		return size();
	}

	int pop( T& data )
	{
		data = m_container.front();
		m_container.pop();

		return size();
	} 

private:
	
	void pop() { m_container.pop(); }

	QUEUE		m_container;
};